home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
src
/
Games
/
gtetris
/
patch-2.1.2
< prev
next >
Wrap
Internet Message Format
|
1995-05-03
|
10KB
From: azhao@cs.arizona.edu (Qiang Alex Zhao)
Date: 19 Jan 93 19:22:10 GMT
Newsgroups: alt.sources
Subject: Generic Tetris Patch 2.1.1 to 2.1.2
diff -c tetris.2.1.orig/README tetris.2.1/README
*** tetris.2.1.orig/README Mon Jan 18 12:02:06 1993
--- tetris.2.1/README Tue Jan 19 11:36:00 1993
***************
*** 1,5 ****
GENERIC TETRIS
! ============== Yet Another Tetris Game on X, V2.1.1
WHY ANOTHER?
--- 1,5 ----
GENERIC TETRIS
! ============== Yet Another Tetris Game on X, V2.1.2
WHY ANOTHER?
***************
*** 9,14 ****
--- 9,15 ----
Xlib -- no "toolkit" kind of thing. People have tested it on the
following platforms:
+ Bull DPX/2 System V ?
DEC 5000 Ultrix 4.2A X11R4
HP 700 HP-UX 8.07 X11R5
Iris 4D IRIX 4.0.1 Motif
***************
*** 59,64 ****
--- 60,71 ----
;o) When the tetris window loses its focus, it also goes to
"paused" mode except it doesn't iconify itself.
+ In previous versions, all number keys on the keypad work. Since I'm
+ going to let the user fully configure things like key bindings,
+ I'll only let those keys on the keypad with label '4', '5', '6'
+ work for now, and do not include a key for "rotate
+ counter-clockwise" (sorry :o).
+
Refer to the man page for detailed command line options.
***************
*** 79,86 ****
HISTORY -- Oh no, not again: I failed my history course!
Well ... ACKNOWLEDGEMENTS
! Since the days of V1.8, I have got many responses over the net.
! Thanks go to people who helped me in improving the program.
[Jan 18, 93] V2.1.1: Fixed a resource look-up bug found by Peter
Kabal <kabal@inrs-telecom.uquebec.ca>, and Imakefile
--- 86,94 ----
HISTORY -- Oh no, not again: I failed my history course!
Well ... ACKNOWLEDGEMENTS
! [Jan 19, 93] V2.1.2: Improved "paused" mode - so it won't take too
! much CPU time - suggested by Philip JENNINGS
! <P.Jennings@frcl.bull.fr>.
[Jan 18, 93] V2.1.1: Fixed a resource look-up bug found by Peter
Kabal <kabal@inrs-telecom.uquebec.ca>, and Imakefile
***************
*** 104,109 ****
--- 112,120 ----
in case some system doesn't have them. Fixed block
clearing bug found by Benjamin Kroop
<bkroop@sunlab.cit.cornell.edu>.
+
+ Since the days of V1.8, I have got many responses over the net.
+ Thanks go to people who helped me in improving the program.
[Nov 13, 92] Black Friday -- V1.8.1: numerious minor changes. Made
score listing built in.
Common subdirectories: tetris.2.1.orig/X11 and tetris.2.1/X11
Common subdirectories: tetris.2.1.orig/bitmaps and tetris.2.1/bitmaps
diff -c tetris.2.1.orig/playing.c tetris.2.1/playing.c
*** tetris.2.1.orig/playing.c Mon Jan 18 12:02:07 1993
--- tetris.2.1/playing.c Tue Jan 19 11:44:22 1993
***************
*** 77,84 ****
} else {
resetTime = evGotNewThing(False);
}
- if (paused)
- resetTime = True;
}
/* never come to here */
}
--- 77,82 ----
***************
*** 90,96 ****
Bool falldown;
{
XEvent ev;
! Bool gotNew = False;
char buf[4];
if (!paused && falldown)
--- 88,94 ----
Bool falldown;
{
XEvent ev;
! Bool gotNew = False, flag;
char buf[4];
if (!paused && falldown)
***************
*** 98,237 ****
while (XPending(display)) {
XNextEvent(display, &ev);
! switch (ev.type) {
! case KeyPress:
! if (!XLookupString(&ev.xkey, buf, 4, NULL, NULL))
! break;
! switch (buf[0]) {
! case 'j':
! case 's':
! if (!paused)
! gotNew = moveOne(LEFT) || gotNew;
! break;
! case 'k':
! case 'd':
! if (!paused)
! gotNew = moveOne(ROTATE) || gotNew;
! break;
! case 'l':
! case 'f':
! if (!paused)
! gotNew = moveOne(RIGHT) || gotNew;
! break;
! case ' ':
! case '\n':
! if (!paused)
! gotNew = moveOne(DROP) || gotNew;
! break;
! case 'q':
! case 'Q':
! gameOver();
! break;
! case '+':
! case '=':
! if (!paused)
! if (level < NUM_LEVELS - 1) {
! level++;
! drawStatus();
}
! break;
! case '-':
! case '_':
! if (!paused)
! if (level > 0) {
! level--;
! drawStatus();
}
break;
! case 'b':
! case 'B':
! beep = !beep;
! if (beep)
! XBell(display, BVOLUME);
break;
! case 'p':
! case 'P':
! if (beep)
! XBell(display, BVOLUME);
! paused = !paused;
! if (paused) {
! /* "... Hi boss, I'm working hard as usual ..." */
banner(MSG_PAUSED);
- (void) XIconifyWindow(display, mainWin, screen_num);
- } else {
- clearNext();
- if (showNext)
- drawNext();
}
- XSync(display, False);
break;
! case '\014':
! XClearWindow(display, mainWin);
! XClearWindow(display, blockWin);
! redrawAll();
! if (paused)
! banner(MSG_PAUSED);
! XSync(display, False);
break;
! case 'n':
! case 'N':
! if (!paused) {
! showNext = !showNext;
! if (showNext) {
! drawNext();
! } else {
! clearNext();
! }
! XSync(display, False);
! }
break;
! default:
! XBell(display, 0);
! XSync(display, False);
break;
}
!
! break;
!
! case UnmapNotify:
! paused = True;
! break;
!
! case FocusOut:
! if (firstFall) {
! paused = True;
! banner(MSG_PAUSED);
! }
! break;
!
! case Expose:
! if (ev.xexpose.count == 0) {
! redrawAll();
! if (paused)
! banner(MSG_PAUSED);
! }
! break;
!
! case ClientMessage:
! if ((Atom) ev.xclient.data.l[0] == delw)
! gameOver();
! break;
!
! case DestroyNotify:
! exit(0);
! break;
}
}
--- 96,244 ----
while (XPending(display)) {
XNextEvent(display, &ev);
! flag = True;
! while (flag) {
! switch (ev.type) {
! case KeyPress:
! if (!XLookupString(&ev.xkey, buf, 4, NULL, NULL))
! break;
! switch (buf[0]) {
! case 'j':
! case 's':
! if (!paused)
! gotNew = moveOne(LEFT) || gotNew;
! break;
! case 'k':
! case 'd':
! if (!paused)
! gotNew = moveOne(ROTATE) || gotNew;
! break;
! case 'l':
! case 'f':
! if (!paused)
! gotNew = moveOne(RIGHT) || gotNew;
! break;
! case ' ':
! case '\n':
! if (!paused)
! gotNew = moveOne(DROP) || gotNew;
! break;
! case 'q':
! case 'Q':
! gameOver();
! break;
! case '+':
! case '=':
! if (!paused)
! if (level < NUM_LEVELS - 1) {
! level++;
! drawStatus();
! }
! break;
!
! case '-':
! case '_':
! if (!paused)
! if (level > 0) {
! level--;
! drawStatus();
! }
! break;
!
! case 'b':
! case 'B':
! beep = !beep;
! if (beep)
! XBell(display, BVOLUME);
! break;
!
! case 'p':
! case 'P':
! if (beep)
! XBell(display, BVOLUME);
! paused = !paused;
! if (paused) {
! /* "... Hi boss, I'm working hard as usual ..." */
! banner(MSG_PAUSED);
! (void) XIconifyWindow(display, mainWin, screen_num);
! } else {
! clearNext();
! if (showNext)
! drawNext();
}
! XSync(display, False);
! break;
! case '\014':
! XClearWindow(display, mainWin);
! XClearWindow(display, blockWin);
! redrawAll();
! if (paused)
! banner(MSG_PAUSED);
! XSync(display, False);
! break;
!
! case 'n':
! case 'N':
! if (!paused) {
! showNext = !showNext;
! if (showNext) {
! drawNext();
! } else {
! clearNext();
! }
! XSync(display, False);
}
+ break;
+
+ default:
+ XBell(display, 0);
+ XSync(display, False);
+ break;
+ }
+
break;
! case UnmapNotify:
! paused = True;
break;
! case FocusOut:
! if (firstFall) {
! paused = True;
banner(MSG_PAUSED);
}
break;
! case Expose:
! if (ev.xexpose.count == 0) {
! redrawAll();
! if (paused)
! banner(MSG_PAUSED);
! }
break;
! case ClientMessage:
! if ((Atom) ev.xclient.data.l[0] == delw)
! gameOver();
break;
! case DestroyNotify:
! exit(0);
break;
}
! if (paused) {
! XNextEvent(display, &ev);
! flag = True;
! gotNew = True; /* for reseting time */
! } else
! flag = False;
}
}
diff -c tetris.2.1.orig/tetris.c tetris.2.1/tetris.c
*** tetris.2.1.orig/tetris.c Mon Jan 18 12:02:06 1993
--- tetris.2.1/tetris.c Tue Jan 19 11:36:49 1993
***************
*** 105,111 ****
char *argv[];
{
(void) fprintf(stderr,
! " GENERIC TETRIS V2.1.1\n");
(void) fprintf(stderr,
"Copyright (C) 1992-93 Q. Alex Zhao, azhao@cs.arizona.edu\n");
(void) fprintf(stderr,
--- 105,111 ----
char *argv[];
{
(void) fprintf(stderr,
! " GENERIC TETRIS V2.1.2\n");
(void) fprintf(stderr,
"Copyright (C) 1992-93 Q. Alex Zhao, azhao@cs.arizona.edu\n");
(void) fprintf(stderr,
diff -c tetris.2.1.orig/tetris.man tetris.2.1/tetris.man
*** tetris.2.1.orig/tetris.man Mon Jan 18 12:02:07 1993
--- tetris.2.1/tetris.man Tue Jan 19 11:37:02 1993
***************
*** 1,4 ****
! .TH TETRIS 6 "18 Jan 1993, V2.1.1" "Univ of Arizona"
.SH NAME
GENERIC TETRIS \- Yet Another Tetris Game on X
.SH SYNOPSIS
--- 1,4 ----
! .TH TETRIS 6 "19 Jan 1993, V2.1.2" "Univ of Arizona"
.SH NAME
GENERIC TETRIS \- Yet Another Tetris Game on X
.SH SYNOPSIS
--
= Qiang Alex Zhao ___ . ______
Computer Science Dept / ) /| ) __// )
University of Arizona / / /_| / _ // /_ _. ._
azhao@cs.arizona.edu (__)(_o / (_(_(-'_)( ((____/ (_(_(_(_)